package com.ruoyi.pet.service.impl;

import java.util.List;

import com.ruoyi.pet.domain.PetMedicalRecord;
import com.ruoyi.pet.mapper.PetMedicalRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pet.service.IPetMedicalRecordService;

/**
 * 诊疗记录Service业务层处理
 * 
 * @author 木有枝
 * @date 2025-04-13
 */
@Service
public class PetMedicalRecordServiceImpl implements IPetMedicalRecordService 
{
    @Autowired
    private PetMedicalRecordMapper petMedicalRecordMapper;

    /**
     * 查询诊疗记录
     * 
     * @param recordId 诊疗记录主键
     * @return 诊疗记录
     */
    @Override
    public PetMedicalRecord selectPetMedicalRecordByRecordId(Long recordId)
    {
        return petMedicalRecordMapper.selectPetMedicalRecordByRecordId(recordId);
    }

    /**
     * 查询诊疗记录列表
     * 
     * @param petMedicalRecord 诊疗记录
     * @return 诊疗记录
     */
    @Override
    public List<PetMedicalRecord> selectPetMedicalRecordList(PetMedicalRecord petMedicalRecord)
    {
        return petMedicalRecordMapper.selectPetMedicalRecordList(petMedicalRecord);
    }

    /**
     * 新增诊疗记录
     * 
     * @param petMedicalRecord 诊疗记录
     * @return 结果
     */
    @Override
    public int insertPetMedicalRecord(PetMedicalRecord petMedicalRecord)
    {
        return petMedicalRecordMapper.insertPetMedicalRecord(petMedicalRecord);
    }

    /**
     * 修改诊疗记录
     * 
     * @param petMedicalRecord 诊疗记录
     * @return 结果
     */
    @Override
    public int updatePetMedicalRecord(PetMedicalRecord petMedicalRecord)
    {
        return petMedicalRecordMapper.updatePetMedicalRecord(petMedicalRecord);
    }

    /**
     * 批量删除诊疗记录
     * 
     * @param recordIds 需要删除的诊疗记录主键
     * @return 结果
     */
    @Override
    public int deletePetMedicalRecordByRecordIds(Long[] recordIds)
    {
        return petMedicalRecordMapper.deletePetMedicalRecordByRecordIds(recordIds);
    }

    /**
     * 删除诊疗记录信息
     * 
     * @param recordId 诊疗记录主键
     * @return 结果
     */
    @Override
    public int deletePetMedicalRecordByRecordId(Long recordId)
    {
        return petMedicalRecordMapper.deletePetMedicalRecordByRecordId(recordId);
    }
}
